import ReactDOM from 'react-dom/client';
import { Provider } from 'react-redux';
import { BrowserRouter } from 'react-router-dom';
import store from 'modules/store';
import App from 'layouts/index';
import 'tdesign-react/es/style/index.css';
import './styles/index.less';


const root = document.getElementById('app');
if (!root) throw new Error('Root element not found');

const renderApp = () => {
  ReactDOM.createRoot(root).render(
    <Provider store={store}>
      <BrowserRouter
        future={{
          v7_startTransition: true, // 启用 v7_startTransition 行为
          v7_relativeSplatPath: true, // 启用 v7_relativeSplatPath 行为
        }}
      >
        <App />
      </BrowserRouter>
    </Provider>,
  );
};

renderApp();
